package com.common.threadlocal;

import com.pojo.dto.UserDTO;

public class UserLocal {
    public static ThreadLocal<UserDTO> threadLocal = new ThreadLocal<>();
    public static void setCurrentUserDTO(UserDTO userDTO) {
        threadLocal.set(userDTO);
    }
    public static UserDTO getCurrentUserDTO() {
        return threadLocal.get();
    }
    public static void removeCurrentUserDTO() {
        threadLocal.remove();
    }
}
